package main

import "fmt"

var channels = [3]chan int{
	nil, make(chan int), nil,
}

var numbers=[]int{1,2,3}
func main() {
	select {
	case getChan(0) <- getNumber(0):
		fmt.Println("The first candidate case is selected.")

	default:
		fmt.Println("No candidate case is selected!")
	}
}
func getNumber(i int) int {
	fmt.Printf("numbers[%d]\n", i)
	return numbers[i]
}
func getChan(i int) chan int {
	fmt.Printf("channels[%d]\n", i)
	return channels[i]
}